Introduction to Mechanistic/Simulation Modeling

Slides: https://www.andreashandel.com/presentations/

2025-05-29

Modeling definition

  • The term modeling usually means (in science) the description and analysis of a system using mathematical or computational models.
  • Many different types of modeling approaches exist. Simulation/mechanistic models are one type (with many subtypes).

Handel et al 2020 NRI

A way to classify models

  • Phenomenological/non-mechanistic/heuristic/(statistical) models
    • Look at patterns in data
    • Do not describe mechanisms leading to the data
  • Mechanistic/process/simulation models
    • Try to represent simplified versions of mechanisms
    • Can be used with and without data

Phenomenological models

  • You are likely familiar with statistical models (that includes Machine Learning, AI, Deep Learning,…).
  • Most of those models are phenomenological/non-mechanistic (and static).
  • Those models are used extensively in all areas of science.
  • The main goal of these models is to understand data/patterns and make predictions.

Non-mechanistic model example

Wu et al 2019 Nature Communications.

Non-mechanistic models - Advantages

  • Finding correlations/patterns is (relatively) simple.
  • Some models are very good at predicting (e.g. Netflix, Google Translate).
  • Sometimes we can go from correlation to causation.
  • We don’t need to understand all the underlying mechanisms to get actionable insights.

Non-mechanistic models - Disadvantages

  • The jump from correlation to causation is always tricky (bias/confounding/systematic errors).
  • Even if we can assume a causal relation, we do not gain a lot of mechanistic insights or deep understanding of the system.

Mechanistic models

  • We formulate explicit mechanisms/processes driving the system dynamics.
  • This is done using mathematical equations (often ordinary differential equations), or computer rules.
  • Also called systems/dynamic(al)/ (micro)simulation/process/ mathematical/ODE/… models.

Handel et al 2020 NRI

Mechanistic models - Advantages

  • We get a potentially deeper, mechanistic understanding of the system.
  • We know exactly how each component affects the others in our model.

Mechanistic models - Disadvantages

  • We need to know (or assume) something about the mechanisms driving our system to build a mechanistic model.
  • If our assumptions/model are wrong, the “insights” we gain from the model are spurious.

Non-mechanistic vs Mechanistic models

  • Non-mechanistic models (e.g. regression models, machine learning) are useful to see if we can find patterns in our data and possibly predict, without necessarily trying to understand the mechanisms.
  • Mechanistic models are useful if we want to study the mechanism(s) by which observed patterns arise.

Ideally, you want to have both in your ‘toolbox’.

Mechanistic/simulation modeling uses

  • Weather forecasting.
  • Simulations of a power plant or other man-made system.
  • Predicting the economy.
  • Infectious disease transmission.
  • Immune response modeling.

www.gocomics.com/nonsequitur

Real-world examples

Using a TB model to explore/predict cytokine-based interventions (Wigginton and Kirschner, 2001 J Imm).

Real-world examples

\[ \begin{aligned} \dot V & = rV-kVT^*\\ \dot P & = fV - dP \\ \dot T & = -aPT \\ \dot T^* & = aPT + gT^* \end{aligned} \]

Handel & Antia 2008 J Vir

Real-world examples

Targeted antiviral prophylaxis against an influenza pandemic (Germann et al 2006 PNAS).

Within-host and between-host modeling

Within-host/individual level Between-host/population level
Spread inside a host (virology, microbiology, immunology) Spread on the population level (ecology, epidemiology)
Populations of pathogens & immune response components Populations of hosts (humans, animals)
Acute/Persistent (e.g. Flu/TB) Epidemic/Endemic (e.g. Flu/TB)
Usually (but not always) explicit modeling of pathogen Often, but not always, no explicit modeling of pathogen

The same types of simulation models are often used on both scales.

A basic model

\[ \begin{aligned} \dot{B} & = g B(1-\frac{B}{B_{max}}) - d_B B - kBI\\ \dot{I} & = r BI - d_I I \end{aligned} \]

Some terminology

\[ \begin{aligned} \dot{B} & = g B(1-\frac{B}{B_{max}}) - d_B B - kBI\\ \dot{I} & = r BI - d_I I \end{aligned} \]

  • The left side is the change in time of the indicated variable.
  • Each term on the right side represents a (often simplified/abstracted) biological process/mechanism.
  • Any positive term on the right side is an inflow and leads to an increase of the indicated variable.
  • Any negative term on the right side is an outflow and leads to a decrease of the indicated variable.

Graphical model representation

  • It is important to go back and forth between words, diagrams, equations.
  • Diagrams specify a model somewhat, but not completely. The diagram below could be implemented as ODEs or discrete time or stochastic models.

Model exploration

  • We could analyze the model behavior with ‘pencil and paper’ (or some software, e.g. Mathematica/Maxima). This only works for simple models.
  • We could analyze the model behavior by simulating it.
  • To simulate, we need to implement the model on a computer, specify starting (initial) conditions for all variables and values for all model parameters.

Handel et al 2020 NRI

Hands-on model exploration

  • Time permitting - let’s play with DSAIRM.
  • https://ahgroup.github.io/DSAIRM/
  • https://shiny.ovpr.uga.edu/DSAIRM/